/* ***********************************************************************
 * Copyright (C) 1992-- 2016 中国南方航空股份有限公司.
 *
 * Created [2016-09-08 15:10:28] by FMS Team
 * ***********************************************************************
 *
 * mybaits-generator
 * ***********************************************************************
 */
package com.foreveross.law.form.domain;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
* <p>com.foreveross.law.form.domain.FormInstance</p>
*
* @author changwu.liao email:changwu.liao(a)gmail.com
* @version 1.0
* @since 1.0
* @Modified by add modified description
* @purpose add this file description here
*/
public class FormInstance implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias	
	public static final String TABLE_SQL_NAME = "FORM_INSTANCE";
	
	public static final String ALIAS_FORM_ID = "formId";
	public static final String ALIAS_FORM_INSTANCE_ID = "formInstanceId";
	public static final String ALIAS_CREATE_DATE = "createDate";
	public static final String ALIAS_CREATE_BY = "createBy";
	
	//the column is a primary key	
	public static final String PROP_KEY = "formInstanceId";
	
	//fields START
	public static String PROP_REF="FormInstance";
	public static String PROP_REF_FORM_ID = "formId";
	
	public static String PROP_REF_FORM_INSTANCE_ID = "formInstanceId";
	
	public static String PROP_REF_CREATE_DATE_BEGIN = "createDateBegin";
	public static String PROP_REF_CREATE_DATE_END = "createDateEnd";
	
	public static String PROP_REF_CREATE_BY = "createBy";
	
	//fields END
	
	//columns sql name START	
	public static String PROP_COLUMN_FORM_ID = "FORM_ID";
	public static String PROP_COLUMN_FORM_INSTANCE_ID = "FORM_INSTANCE_ID";
	public static String PROP_COLUMN_CREATE_DATE = "CREATE_DATE";
	public static String PROP_COLUMN_CREATE_BY = "CREATE_BY";
	//columns sql name END
		
	//columns START
	private java.lang.String formId;
	private java.lang.String formInstanceId;
	private java.util.Date createDate;
	private java.lang.String createBy;
	//columns END

	public FormInstance(){
	}

	public FormInstance(
		java.lang.String formInstanceId
	){
		this.formInstanceId = formInstanceId;
	}

	public void setFormId(java.lang.String value) {
		this.formId = value;
	}
	
	public java.lang.String getFormId() {
		return this.formId;
	}
	public void setFormInstanceId(java.lang.String value) {
		this.formInstanceId = value;
	}
	
	public java.lang.String getFormInstanceId() {
		return this.formInstanceId;
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}
	public void setCreateBy(java.lang.String value) {
		this.createBy = value;
	}
	
	public java.lang.String getCreateBy() {
		return this.createBy;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("FormId",getFormId())
			.append("FormInstanceId",getFormInstanceId())
			.append("CreateDate",getCreateDate())
			.append("CreateBy",getCreateBy())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getFormInstanceId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof FormInstance == false) return false;
		if(this == obj) return true;
		FormInstance other = (FormInstance)obj;
		return new EqualsBuilder()
			.append(getFormInstanceId(),other.getFormInstanceId())
			.isEquals();
	}
}

